from redis import StrictRedis

class Config:
    DEBUG = True
    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@localhost/python02'
    SECRET_KEY = 'ZPG41Z898sPpzRMW/1JO6pTWh0vRgjzxT9GJb1abqHU='
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    REDIS_HOST = '127.0.0.1'
    REDIS_PORT = 6379
    SESSION_TYPE = 'redis'
    SESSION_REDIS = StrictRedis(host=REDIS_HOST,port=REDIS_PORT)
    SESSION_USE_SIGNER = True
    PERMANENT_SESSION_LIFETIME = 86400
class developmentConfig(Config):
    DEBUG = True
class productionConfig(Config):
    DEBUG = False
config = {
    'development':developmentConfig,
    'production':productionConfig
}